package com.zbkj.crmeb.task.order;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import com.utils.DateUtil;
import com.zbkj.crmeb.store.service.OrderTaskService;


/**
 * 香港支付订单支付状态查询
 */
@Component
@Configuration //读取配置
public class HkPayOrderPaymentStatusQuery {

    private static final Logger logger = LoggerFactory.getLogger(HkPayOrderPaymentStatusQuery.class);


    @Autowired
    private OrderTaskService orderTaskService;

    private  static final int merId = 29;

	//30分钟查询一次
    //@XxlJob("hkPayOrderPaymentStatusQuery")
    public void init(){
        logger.info("---HkPayOrderPaymentStatusQuery task------produce Data with fixed rate task: Execution Time - {}", DateUtil.nowDateTime());
        try {
            orderTaskService.orderPaymentStatusQuery(merId);
        }catch (Exception e){
            e.printStackTrace();
            logger.error("HkPayOrderPaymentStatusQuery.task" + " | Exception : {}", e);
        }

    }
}
